package com.ygl.example.service.exception;

import com.alibaba.csp.sentinel.slots.block.BlockException;

/**
 * @Author yanggld
 * @Date 2020/1/8-15:49
 * @Description
 */
public class ExceptionUtil {

	public static final String FALLBACK_DEFAULT_RESULT = "FALLBACK_DEFAULT_RESULT";

	public static String handleException(){
		return "Oops, error occurred at " ;
	}

	public static String fallback(Throwable t){
		t.printStackTrace();
		return FALLBACK_DEFAULT_RESULT;
	}

	public static String defaultHandleBlockException(Throwable t){
		t.printStackTrace();
		return FALLBACK_DEFAULT_RESULT;
	}
}
